from pathlib import Path
import os
import stat


def mkdir(dir):
    path = Path(dir)
    if not path.exists():
        path.mkdir(parents=True)
        os.chmod(path, stat.S_IRWXU + stat.S_IRWXG + stat.S_IRWXO)
    else:
        print(f"Directory '{dir}' already exists.")
